package com.appspot.menox3secandroid2011.controller;

import java.util.Map;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import org.slim3.util.RequestMap;

public class MenuController extends Controller {

    @Override
    public Navigation run() throws Exception {
        Map<String, Object> input = new RequestMap(request);
        String jspName = "Menu.jsp";
        if(input.get("menuNo") != null){
            if(input.get("menuNo").equals("0")){
                jspName = "/SiteList";
                return redirect(jspName);
            }else if(input.get("menuNo").equals("1")){
                jspName = "/NyutaiRirekiItiran";
                return redirect(jspName);
            }else if(input.get("menuNo").equals("2")){
                jspName = "/Menu";
                return redirect(jspName);
            }
            else if(input.get("menuNo").equals("3")){
                jspName = "/Menu";
                return redirect(jspName);
            }
        }

        return forward(jspName);
    }
}
